package com.alibaba.otter.manager.web.mapstruct;

import com.alibaba.otter.manager.biz.statistics.throughput.param.AnalysisType;
import com.alibaba.otter.manager.biz.statistics.throughput.param.ThroughputInfo;
import com.alibaba.otter.manager.web.dto.RecentThroughputStatDTO;
import com.alibaba.otter.shared.common.model.statistics.throughput.ThroughputStat;
import org.mapstruct.Mapper;
import org.mapstruct.MappingConstants;

import java.util.Map;

@Mapper(componentModel = MappingConstants.ComponentModel.SPRING)
public interface ThroughputMapper{


    RecentThroughputStatDTO toRecentThroughputStatDTO(ThroughputStat stat, Map<AnalysisType, ThroughputInfo> recentThroughputStats);


    Map<Long, RecentThroughputStatDTO.ThroughputInfoDTO>  toMapThroughputStatDTO( Map<Long, ThroughputInfo> throughputInfo);
}
